package com.ruicar.afs.cloud.basic.common.condition;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.common.modules.contract.enums.PersonRoleTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 新增申请弹框request参数
 */
@Data
public class QueryContractListCondition {
    @ApiModelProperty("每页大小")
    private int pageSize;

    @ApiModelProperty("当前页数")
    private int pageIndex;

    @ApiModelProperty("合同号")
    private String contractNo;

    @ApiModelProperty("申请编号")
    private String applyNo;

    @ApiModelProperty("客户名称")
    private String custName;

    @ApiModelProperty("手机号码")
    private String phone;

    @ApiModelProperty("证件号码")
    private String certNo;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("合同激活时间起")
    private Date startCreateDate;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("合同激活时间止")
    private Date endCreateDate;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("合同到期时间起")
    private Date startFinishDate;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("合同到期时间止")
    private Date endFinishDate;

    @ApiModelProperty("合同状态")
    private String contractStatusEnum;

    @ApiModelProperty("合同状态")
    private PersonRoleTypeEnum custRole;

    @JsonSerialize(using = ToStringSerializer.class)
    @JSONField(serializeUsing = com.alibaba.fastjson.serializer.ToStringSerializer.class)
    @ApiModelProperty("渠道id")
    private Long channelId;

}
